The present invention relates to a semiconductor device, and particularly to a semiconductor device including an electrically rewritable nonvolatile memory.
In a nonvolatile memory such as a flash memory, a write current flows through a memory cell subjected to writing during programming. In this case, an increase in the number of simultaneously programmed memory cells makes-it difficult to maintain constant the voltage level of a program voltage.
To address this problem, a flash memory device described in Japanese Unexamined Patent Publication No. 2007-193936 (Patent Document 1) includes, besides a flash memory cell array, a plurality of dummy program current generating elements each capable of passing a dummy program current having the same magnitude as a program current. Further, control is performed so that the sum of a plurality of program currents and a plurality of dummy program currents becomes constant regardless of the number of simultaneously programmed memory cells.